﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyFileUC.ascx.cs" Inherits="KhoaLuan.Account.MyFileUC" %>
<script src="/Scripts/dluscript.js"></script>
<script type="text/javascript">

    function capnhat() {
        debugger;
        var fullname = $('#<%=txtHoTen.ClientID %>').val();
        var pass = $('#<%=TxtMatKhau.ClientID %>').val();
        var userId = $('#<%=txtId.ClientID %>').val();
        var userName = $('#<%=txtTendangnhap.ClientID %>').val();
        var email = $('#<%=txtEmail.ClientID %>').val();
        var address = $('#<%=txtDiaChi.ClientID %>').val();
        var phone = $('#<%=txtSoDienThoai.ClientID %>').val();
        var mobile = $('#<%=txtDiDong.ClientID %>').val();

        var data = {
            UserName: userName,
            UserID: parseInt(userId),
            FullName: fullname,
            Email: email,
            Address: address,
            Phone: phone,
            Mobile: mobile,
            Pass: pass
        };
        debugger;
        var callback = function (data) {
            var responseDel = JSON.parse(data);
            if (responseDel.Status == "Success") {
                alertSmallBox("Update User thành công", "1 giây trước");
            }
            else {
                alertSmallBox("Update User thất bại", "1 giây trước");
            }

        }
        debugger;

        CallAjaxAspx("POST", "UpdateMyUser", "/MainSys/ProcessAJAX/AJAXUser.aspx", data, callback, function () {
            $("body").addClass("loading");
        }, function () {
            $("body").removeClass("loading");
        });
    }

</script>

<article class="col-sm-12 col-md-12 col-lg-12 sortable-grid ui-sortable">
    <div class="jarviswidget" id="wid-id-1" data-widget-editbutton="false" data-widget-custombutton="false">
        <header>
            <span class="widget-icon"><i class="fa fa-edit"></i></span>
            <h2>THÔNG TIN CÁ NHÂN</h2>
        </header>
        <div>
            <div class="jarviswidget-editbox">
            </div>
            <div class="widget-body no-padding">
                <div id="checkout-form" class="smart-form" novalidate="novalidate">

                    <input type="hidden" id="txtId" runat="server" />
                    <fieldset>
                        <div class="row">
                            <section class="col col-6">
                                <label>
                                    Tên Đăng Nhập
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-user"></i>
                                    <input type="text" id="txtTendangnhap" runat="server" disabled="disabled" placeholder="Tên Đăng Nhập" />
                                </label>
                            </section>
                            <section class="col col-6">
                                <label>
                                    Họ và tên
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-user"></i>
                                    <input type="text" id="txtHoTen" runat="server" placeholder="Họ và tên" />
                                </label>
                            </section>
                        </div>
                        <section>
                            <label>
                                Địa chỉ
                            </label>
                            <label for="address" class="input">
                                <input type="text" id="txtDiaChi" runat="server" placeholder="Địa chỉ" />
                            </label>
                        </section>

                        <div class="row">
                            <section class="col col-6">
                                <label>
                                    Email
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-envelope-o"></i>
                                    <input type="text" id="txtEmail" runat="server" placeholder="E-mail" />
                                </label>
                            </section>
                            <section class="col col-6">
                                <label>
                                    Số điện thoại
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-phone"></i>
                                    <input type="text" id="txtSoDienThoai" runat="server" placeholder="Số điện thoại" />
                                </label>
                            </section>
                        </div>
                        <div class="row">
                            <section class="col col-6">
                                <label>
                                    Số di động
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-phone"></i>
                                    <input type="text" id="txtDiDong" runat="server" placeholder="Số điện thoại" />
                                </label>
                            </section>
                            <section class="col col-6">
                                <label>
                                    Mật khẩu xác nhận
                                </label>
                                <label class="input">
                                    <i class="icon-prepend fa fa-envelope-o"></i>
                                    <asp:TextBox ID="TxtMatKhau" runat="server" TextMode="Password"></asp:TextBox>
                                </label>
                            </section>
                        </div>
                    </fieldset>

                    <footer>
                        <input class="btn btn-primary" type="button" id="btnUpdate" onclick="capnhat()" runat="server" value="Lưu thông tin" />
                    </footer>
                </div>
            </div>

        </div>
    </div>
</article>
